package com.eralink.readerfinderlib;

enum ReaderFinderCmdCode {
    CmdDiscovery(0x0001), // 发现设备
    CmdGetNetConfig(0x0002), // 获取网络配置
    CmdSetNetConfig(0x0003), // 设置网络配置
    CmdRestart(0x0004); // 重启设备

    private final int value;

    ReaderFinderCmdCode() {
        this(Counter.nextValue);
        Counter.nextValue += 1;
    }

    ReaderFinderCmdCode(int value) {
        this.value = value;
        Counter.nextValue = value + 1;
    }

    public int getValue() {
        return this.value;
    }

    private static class Counter {
        private static int nextValue = 0;
    }
}
